import Home from "../views/Home.vue";

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.路由懒加载
    // /* webpackChunkName: "about" */ 打包加载
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue")
  },
  {
    path: "/urlParam",
    name: "UrlParam",
    component: () => import("../views/UrlParam.vue")
  },
  {
    path: "*",
    name: "404",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.路由懒加载
    // /* webpackChunkName: "about" */ 打包加载
    component: () => import("../views/404.vue")
  }
];

export default routes;
